package com.chapter01exercise.homework01;

/**
 * @Author 小闽
 * @Date 2024/8/15 17:25
 * @PackageName: com.chapter01exercise.homework01
 * @ClassName: Person
 * @Description: 人类
 * @Version 1.0
 */
public class Person {
    private String name;
    private int age;
    private String job;

    /**
     * 构造器
     * @param name
     * @param age
     * @param job
     */
    public Person(String name, int age, String job) {
        this.name = name;
        this.age = age;
        this.job = job;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    /**
     * 重写父类的toString方法
     * @return
     */
    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", job='" + job + '\'' +
                '}';
    }
}
